package com.xiaosheng.ljswl.Config;

import android.app.Application;

import serial.utils.SerialZbThread;

public class SerialApplication extends Application {
    private SerialZbThread serialZbThread;

    @Override
    public void onCreate() {
        super.onCreate();
        serialZbThread = new SerialZbThread("/dev/ttyAMA4");
        serialZbThread.start();
    }

    @Override
    public void onTerminate() {
        if (serialZbThread != null) {
            serialZbThread.interrupt();
            serialZbThread = null;
        }
        super.onTerminate();
    }

    public SerialZbThread getSerialZbThread() {
        return serialZbThread;
    }
}
